<template>
  <div class="m_wrap">
    <div class="f_list" 
    v-if="userList.length > 0 " 
    v-for="(item,index) in userList" 
    :key="index"> 
      <div class="f_l"><img :src="item.userImg" alt></div>
      <div class="f_m">
        <p class="f_name">{{item.userName}}</p>
        <p><span class="sex">{{item.sex}}</span><span class="age">{{item.age}}</span><span class="type">{{item.type}}</span></p>
      </div>
      <div class="f_r">
        <span>已关注</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "FollowList",
  data() {
    return {
        userList:[]  
    }
  },
  mounted() {
    this.$axios.get("http://localhost:3000/api/userInfo",{
      
    })
    .then(res => {
      this.userList = res.data[0].bloggerArticles
      
    })
    .catch(error => {
      console.log(error);
    })
  },
};

</script>
<style scoped  lang="less">
  .m_wrap {
    margin: 10px 0;
    .f_list {
      float: left;
      width: 100%;
      background-color: white;
      padding: 15px 15px;
      display: flex;
      justify-content:center;
      align-items:Center;
      box-shadow: 3px 0 4px 3px #EDEDED;
      margin-bottom: 10px;
      font-size: 16px;
      .f_l{
        float: left;
        width: 20%;
      }
      .f_m{
        float: left;
        width: 50%;
        padding-left: 10px;
        .f_name{
          margin-bottom: 5px;
          font-size: 20px;
        }
        span{
          padding-right: 5px;
        }
      }
      .f_r{
        float: left;
        width: 30%;
        span{
          display: block;
          width: 55px;
          height: 20px;
          line-height: 20px;
          text-align: center;
          color: #ff406f;
          font-size: 12px;
          border: 2px solid #ff406f;
          border-radius: 0.7em;
        }
        }
      
    }
  }
  
</style>